You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commit: add report merge + HTML summary, improve test utilities, and update runner
• Add report tooling
• Add merge-reports.js
• Recursively finds .last-run.json files under reports, safely parses them, and writes a consolidated combined-report.json with metadata (generatedAt, sourceCount, reports[]).
• Add ui/scripts/generate-html-report.js
• Reads combined-report.json and generates ui/reports/combined-report.html.
• Summary counts (passed/failed/other) and per-report rows.
• Recursively discovers all images (png/jpg/gif/webp) under each report folder and displays clickable thumbnails that link to the full image.
• CI / runner integration
• Update ui/tests/utils/run-tests.sh
• After all tests, run node scripts/merge-reports.js && node scripts/generate-html-report.js to produce combined JSON + HTML summary automatically (no Playwright UI merge).
• Test framework & utilities improvements
• ui/tests/base/BasePage.ts
• Add waitForHealthyState() helper to wait for a health-check response (200) before proceeding.
• ui/tests/base/BaseTest.ts
• Export sleep(ms) helper for reuse in pages/tests.
• ui/tests/pages/PerpetualsPage.ts
• Import sleep from BaseTest and use it in cancelOrderCreated() to wait with sleep(12000) (replacing a direct waitForTimeout).
• Tests updates (e2e)
• ui/tests/e2e/create-account-deposit.spec.ts
• beforeEach now receives context, navigates to /, calls homePage.waitForHealthyState() and closes any about:blank pages that were opened automatically by Synpress.
• Adds afterEach to close page and context.
• Minor test flow tweaks (some navigation/ordering adjustments).
• ui/tests/e2e/place-limit-order.spec.ts
• Similar beforeEach changes: uses context, checks health, closes blank tabs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drift Labs Trial – Test Automation Solution
This PR contains a solution for the Drift Labs trial using Playwright as the test automation framework and Synpress to handle wallet interactions.
Pre-requisites
You can refer to the official repository for setup:
https://github.com/drift-labs/drift-ui-template
Install Phantom wallet from their offical site:
https://phantom.com
Setup Wallet Caches
chmod +x tests/utils/generate_wallet_caches.sh./tests/utils/generate_wallet_caches.shThis will create wallet caches under the
.cache-synpressfolder.Copy the generated cache IDs into the
run-tests.shfile.Example usage in
run-tests.sh:run_test "{this_is_the_cache_id}" "create-account-deposit.spec.ts" "TC-CA-001"Running Tests
All tests can be executed with:
npm run test:driftThe script will:
Project Structure
Notes
Each test in run-tests.sh uses a specific Synpress cache ID to ensure wallet state is preserved.
Make sure the Drift app is running locally before executing the tests.